﻿using System;

namespace ReadyApps.Data.Wiki
{
    /// <summary>
    /// Contains metadata information about a particular page and revision.
    /// </summary>
    public class PageInformation
    {
        #region Properties

        /// <summary>
        /// Gets the unique identifier for the page.
        /// </summary>
        public int PageID { get; private set; }

        /// <summary>
        /// Gets the page name.
        /// </summary>
        public string PageName { get; private set; }

        /// <summary>
        /// Gets the title of the page.
        /// </summary>
        public string PageTitle { get; private set; }

        /// <summary>
        /// Gets the revision number of the page revision.
        /// </summary>
        public int RevisionNumber { get; private set; }

        /// <summary>
        /// Gets the revision date for the page revision.
        /// </summary>
        public DateTime RevisionDate { get; private set; }

        /// <summary>
        /// Gets the username of the user that created the page revision.
        /// </summary>
        public string RevisionAuthor { get; private set; }

        /// <summary>
        /// Gets a value indicating whether or not the page is currently being versioned.
        /// </summary>
        public bool Versioned { get; private set; }

        /// <summary>
        /// Gets the status of the page revision.
        /// </summary>
        public string RevisionStatus { get; private set; }

        #endregion

        #region Constructor

        /// <summary>
        /// Creates a new <see cref="PageInformation"/> object with the supplied values.
        /// </summary>
        /// <param name="pageID">The unique page identifier.</param>
        /// <param name="pageName">The name of the page.</param>
        /// <param name="pageTitle">The page title.</param>
        /// <param name="revisionNumber">The revision number for the page revision.</param>
        /// <param name="revisionDate">The date when the page revision was created.</param>
        /// <param name="revisionAuthor">The username of the user that created the page revision.</param>
        /// <param name="versioned">A value indicating whether or not the page is currently being
        /// versioned.</param>
        /// <param name="revisionStatus">The status of the page revision.</param>
        public PageInformation(int pageID, string pageName, string pageTitle, int revisionNumber,
            DateTime revisionDate, string revisionAuthor, bool versioned, string revisionStatus)
        {
            PageID = pageID;
            PageName = pageName;
            PageTitle = pageTitle;
            RevisionNumber = revisionNumber;
            RevisionDate = revisionDate;
            RevisionAuthor = revisionAuthor;
            Versioned = versioned;
            RevisionStatus = revisionStatus;
        }

        #endregion
    }
}
